package com.example.boot07test01.mapper;

import com.example.boot07test01.entity.Emp;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EmpMapper {
    @Insert("insert into emp values(null,#{name},#{salary},#{job})")
    void insertEmp(Emp emp);
    @Select("select * from emp")
    List<Emp> selectEmp();
    @Delete("delete from emp where id=#{id}")
    void deleteEmpById(int id);
    @Update("update emp set name=#{name},salary=#{salary},job=#{job} where id=#{id}")
    void updateEmp(Emp emp);
}
